print("干部竞选系统")
print("请输入竞选者姓名")
a = input("竞选者1：")
b = input("竞选者2：")
c = input("竞选者3：")
d = input("竞选者4：")
e = input("竞选者5：")
student = {a : 0,
           b : 0,
           c : 0,
           d : 0,
           e : 0,
           "无效票数": 0
}
count = 0
while count <10:
    name = input("请输入你支持的候选人姓名:")
    if name == a:
        student[a] +=1
    elif name == b:
        student[b] +=1
    elif name == c:
        student[c] +=1
    elif name == d:
        student[d] +=1
    elif name == e:
        student[e] +=1
    else:
        student["无效票数"] +=1
    count +=1
print(student)
print(max(student.values()))
for key,value in student.items():
    if(value == max(student.values())):
        if ("%s"%key) == "无效票数":
            print("此次投票无效")
        else:
            print("恭喜%s成为班长"%key)
# 平票的状况未设置
